<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

// 前台
Route::get('/', 'index/index/index');
Route::get('/index', 'index/index/index');
Route::get('/index', 'index/index/index');


Route::get('/about', 'index/index/about');

Route::get('/contact', 'index/index/contact');

// 后台
// 后台首页

Route::get('/admin/index/index', 'admin/index/index');

// 后台登录界面
Route::get('/admin', 'admin/login/index');

// 后台验证码
Route::get('/admin/login/checkVerify', 'admin/login/checkVerify');

// 后台登录
Route::post('/admin/login/doLogin', 'admin/login/doLogin');

//后台默认首页
Route::get('/admin/index/indexPage', 'admin/index/indexPage');

// 管理员管理
Route::get('/admin/user/index', 'admin/user/index');

//后台用户管理(普通用户管理)
Route::get('/admin/comuser/index','admin/comuser/index');
Route::get('/admin/comuser/statusEdit','admin/comuser/statusEdit');
Route::get('/admin/comuser/status','admin/comuser/status');



// 添加管理员userAdd
Route::get('/admin/user/userAdd', 'admin/user/useradd');
Route::post('/admin/user/userAdd', 'admin/user/userAdd');


// 编辑管理员用户userEdit
Route::get('admin/user/useredit/id/:id', 'admin/user/useredit', ['ext' => 'html']);
Route::post('/admin/user/userEdit', 'admin/user/userEdit');

// 删除用户userDel
Route::get('admin/user/userDel', 'admin/user/userDel');

// 拼装操作按钮makeButton
Route::get('/admin/user/makeButton', 'admin/user/makeButton');


// 角色管理
Route::get('/admin/role/index', 'admin/role/index');

// 添加角色页面
Route::get('/admin/role/roleAdd', 'admin/role/roleadd');
//执行添加角色
Route::post('admin/role/roleadd', 'admin/role/roleadd');

// 编辑角色roleedit
Route::get('admin/role/roleedit/id/:id', 'admin/role/roleedit', ['ext' => 'html']);
//执行编辑
Route::post('/admin/role/roleEdit', 'admin/role/roleEdit');
//评论
Route::post('/index/content/conten','index/content/conten');

// 分配权限giveAccess
Route::rule('/admin/role/giveAccess', 'admin/role/giveAccess', 'GET|POST');


// 编辑角色roleEdit
Route::get('/admin/role/roleedit/id/:id', 'admin/role/roleedit', ['ext' => 'html']);
Route::post('/admin/role/roleEdit/id/:id', 'admin/role/roleEdit');

// 删除角色
Route::get('/admin/role/roleDel', 'admin/role/roleDel');

// 拼装操作按钮
Route::get('/admin/role/makeButton', 'admin/role/makeButton');

// 节点管理
Route::get('/admin/node/index', 'admin/node/index');

//编辑节点
Route::post('/admin/node/nodeEdit','admin/node/nodeEdit');

// 添加顶级节点

Route::post('/admin/node/nodeAdd', 'admin/node/nodeAdd');
//删除节点
Route::get('/admin/node/nodeDel', 'admin/node/nodeDel');
//编辑节点
Route::post('/admin/node/nodeEdit', 'admin/node/nodeEdit');
//数据备份首页
Route::get('/admin/data/index', 'admin/data/index');
//备份按钮
Route::get('/admin/data/importData', 'admin/data/importData');
//还原按钮
Route::get('/admin/data/backData', 'admin/data/backData');
//退出登录
Route::get('/admin/login/loginout', 'admin/login/loginout');




// 话题
// 话题列表
Route::get('/admin/talk/index','admin/talk/index');
// 添加话题列表
Route::get('/admin/talk/talkAdd','admin/talk/talkadd');
Route::post('/admin/talk/talkAdd', 'admin/talk/talkAdd');
// 添加编辑页面
Route::get('admin/talk/talkedit/id/:id', 'admin/talk/talkedit', ['ext' => 'html']);
//执行编辑
Route::post('/admin/talk/talkEdit', 'admin/talk/talkEdit');
//删除
Route::get('/admin/talk/talkDel', 'admin/talk/talkDel');
// 修改状态
Route::get('/admin/talk/statusEdit', 'admin/talk/statusEdit');



Route::get('/admin/login/index', 'admin/login/index');
//后台微博模块


//微博列表
Route::get('/admin/weibo/index', 'admin/weibo/index');
//微博详情
Route::get('/admin/weibo/show/id/:id', 'admin/weibo/show', ['ext' => 'html']);
//删除微博
Route::get('/admin/weibo/weibodel', 'admin/weibo/weibodel');

//前台登录
Route::get('/index/login/index','index/login/index');
Route::get('/index/login/tellogin','index/login/tellogin');
Route::post('index/login/dologin','index/login/dologin');
Route::post('index/login/dotellogin','index/login/dotellogin');

//登录成功
Route::get('/index/index/dologin','index/index/dologin');

//退出登录
Route::get('/index/login/loginout','index/login/loginout');

//前台普通用户注册页面
Route::get('/index/index/add','index/index/add');
Route::post('/index/add/add','index/add/add');

//前台企业用户注册页面
Route::get('/index/index/badd','index/index/badd');

//前台分类点击跳转
Route::get('/index/about/:id','index/index/about');
//首页
Route::get('/index/index/index','index/index/index');

//首页跳转话题模块
Route::get('/index/talk','index/index/talk');

// 话题详情
Route::get('/index/talk/index/:id','index/talk/index', ['ext' => 'html']);
//dologin页面返回首页页面
Route::get('/index/doindex','index/doindex');







// 商业用户列表
Route::get('/admin/business/index','admin/business/index');
// 详情
Route::get('admin/business/show/id/:id', 'admin/business/show', ['ext' => 'html']);
Route::get('/admin/business/status/:id','admin/business/status');
// 修改状态
Route::get('/admin/business/statusEdit', 'admin/business/statusEdit');


Route::get('/admin/articles/index', 'admin/articles/index');




//前台
Route::get('/', 'index/index/index');
Route::get('/index', 'index/index/index');
Route::get('/index', 'index/index/index');
Route::get('/about', 'index/index/about');
Route::get('/contact', 'index/index/contact');
Route::get('/fashion', 'index/index/fashion');
Route::get('/features', 'index/index/features');
Route::get('/icons', 'index/index/icons');
Route::get('/lifestyle', 'index/index/lifestyle');
Route::get('/photography', 'index/index/photography');
Route::get('/singlepage', 'index/index/singlepage');
Route::get('/typo', 'index/index/typo');
Route::get('/contact', 'index/index/contact');

//微博搜索


Route::post('/wbSearch','index/index/wbSearch');
Route::post('/wbSearch','index/search/wbSearch');



Route::post('/wbSearch','index/search/wbSearch');


//前台登录
Route::get('/login', 'index/index/login');



//游客访问详情



//Route::post('/tourists','index/index/tourists');
Route::post('/tourists','index/search/tourists');

Route::get('/tourists','index/search/tourists');



//  前台商业用户
Route::get('/buser', 'index/buser/index');
Route::get('/photo', 'index/buser/photo');




// 商业用户列表
Route::get('/admin/business/index','admin/business/index');
// 详情
Route::get('admin/business/show/id/:id', 'admin/business/show', ['ext' => 'html']);

Route::get('/admin/articles/index', 'admin/articles/index');

// 添加广告
//Route::get('/bad', 'index/index/bad');
Route::get('/bad', 'index/buser/bad');
Route::post('/index/buser/bad', 'index/buser/save');

//前台添加活动
Route::get('/activity','index/activity/activityAdd');
//前台上传图片
Route::post('/index/activity/uploadImg','index/activity/uploadImg');
//前台提交添加
Route::post('/index/activity/activity','index/activity/activityAdd');
//服务活动列表
Route::get('/server', 'index/activity/server');


//转发活动
Route::get('/forwarding','index/details/forwarding');
//转发按钮
Route::post('/index/send/turn','index/send/trun');
//抽奖
Route::get('/details','index/details/index');
//投票
Route::get('/vote','index/details/vote');
//投票点击后的结果
Route::get('/vote/results','index/details/votedo');



//前台普通用户中心
Route::get('/cuser','index/cuser/index');
Route::get('/cphoto','index/cuser/cphoto');



//前台
Route::get('/', 'index/index/index');
Route::get('/index', 'index/index/index');
Route::get('/index', 'index/index/index');
Route::get('/about', 'index/index/about');
Route::get('/contact', 'index/index/contact');
Route::get('/fashion', 'index/index/fashion');
Route::get('/features', 'index/index/features');
Route::get('/icons', 'index/index/icons');
Route::get('/lifestyle', 'index/index/lifestyle');
Route::get('/photography', 'index/index/photography');
Route::get('/singlepage', 'index/index/singlepage');
Route::get('/typo', 'index/index/typo');
Route::get('/contact', 'index/index/contact');


//前台普通用户上传头像
Route::post('/index/icon','index/icon');


//前台登录
Route::get('/login', 'index/index/login');






//  前台商业用户个人中心

//  前台商业用户
Route::get('/buser', 'index/buser/index');
Route::get('/photo', 'index/buser/photo');

//Route::get('/server', 'index/buser/server');

// 添加广告
//Route::get('/bad', 'index/index/bad');
Route::get('/bad', 'index/buser/bad');
Route::post('/index/buser/bad', 'index/buser/save');

//前台企业用户中心

Route::get('/buser', 'index/buser/index');
Route::get('/photo', 'index/buser/photo');

//Route::get('/server', 'index/buser/server');



//前台普通用户中心
Route::get('/cuser','index/cuser/index');
Route::get('/cphoto','index/cuser/cphoto');



//前台普通用户编辑页面
Route::get('/edit','index/cuser/edit');

//前台普通用户编辑密码页面
Route::get('/editpass','index/cuser/editpass');

//前台用户执行编辑
Route::post('/index/cuser/doedit','index/cuser/doedit');

//前台用户执行编辑密码
Route::post('/index/cuser/doeditpass','index/cuser/doeditpass');

//前台普通用户私聊页面
Route::get('/chat','index/cuser/chat');

//前台其他普通用户首页
Route::get('/index/cuser/other/attentId/:attent_id','index/cuser/other');
Route::get('/other/attentId/:fans_id','index/cuser/other');


//前台普通用户私聊
Route::post('/index/cuser/inchat','index/cuser/inchat');

//前台普通用户删除微博
Route::get('/cuser/delWeibo', 'index/cuser/delWeibo');






//活动首页
Route::get('/admin/articles/index','admin/articles/index');
//添加活动
Route::get('/admin/articles/articleadd','admin/articles/articleadd');
//提交添加
Route::post('/admin/articles/articleadd','admin/articles/articleadd');
//上传省略图
Route::post('/admin/articles/uploadImg','admin/articles/uploadImg');
//删除活动
Route::get('/admin/articles/articleDel','admin/articles/articleDel');
//改变状态
Route::get('/admin/articles/statusEdit','admin/articles/statusEdit');
//活动编辑
Route::get('/admin/articles/articleedit/id/:id','admin/articles/articleedit',['ext'=>'html']);
//提交编辑
Route::post('/admin/articles/articleedit','admin/articles/articleedit');


//分类列表
Route::get('/admin/classify/index','admin/classify/index');
//添加一级分类
Route::get('/admin/classify/classifyadd','admin/classify/classifyadd');
//提交一级分类
Route::post('/admin/classify/classifyadd','admin/classify/classifyadd');
//删除一级分类
Route::get('/admin/classify/classifyDel','admin/classify/classifyDel');
//添加子级分类
Route::get('/admin/classify/classifysdy/id/:id','admin/classify/classifysdy');
//查看子分类
Route::get('/admin/classifycld/index/id/:id','admin/classifycld/index');
Route::get('/admin/classifycld/index','admin/classifycld/index');
//删除子分类
Route::get('/admin/classifycld/classifycldDel','admin/classifycld/classifycldDel');

//互动列表
Route::get('/admin/interact/index','admin/interact/index');
//统计列表
Route::get('/admin/statistical/index','admin/statistical/index');


//上传图片
Route::post('/index/send/uploadImg','index/send/uploadImg');
//发送微博
Route::post('/index/send/sendWeibo','index/send/sendWeibo');
//点赞
Route::get('/index/send/agree/:id','index/send/agree');
//详情页
Route::get('/index/show/index/id/:id','index/show/index');
//详情页发表评论
Route::post('/index/content/content','index/content/content');
//转发
Route::get('/index/send/turn/id/:id','index/send/turn');
//消息话题跳转
Route::get('/index/talk/name','index/talk/name');

//  前台商业用户
Route::get('/business/attentId/:attentId', 'index/business/index',['ext'=>'html']);
Route::get('/business/server/attentId/:attentId', 'index/business/server',['ext'=>'html']);
Route::get('/business/photo/attentId/:attentId', 'index/business/photo',['ext'=>'html']);


// 关注
Route::get('/business/checkDate', 'index/business/checkDate');
Route::get('/business/checkDate1', 'index/business/checkDate1');
Route::get('/business/attent', 'index/business/attent');
Route::get('/business/delAttent', 'index/business/delAttent');
Route::get('/business/isAttent', 'index/business/isAttent');
// 关注/粉丝连接
Route::get('/business/attentId/:attent_id', 'index/business/index');
Route::get('/other/attent_id/:attent_id', 'index/business/other');

Route::get('/business/attentId/:fans_id', 'index/business/index');
Route::get('/business/attent_id/:fans_id', 'index/business/other');

//转发
Route::post('/index/send/turn','index/send/turn');
//回复
Route::post('/index/show/replay','index/show/replay');



// 前台商业用户删除微博
Route::get('/buser/delWeibo', 'index/buser/delWeibo');


// 新闻接口
Route::get('/', 'index/News/index');
//Route::get('getNews', 'index/News/getNews');

// 后台广告
// 广告列表
Route::get('/admin/banner/index','admin/banner/index');
// 添加广告列表
Route::get('/admin/banner/bannerAdd','admin/banner/banneradd');
Route::post('/admin/banner/banneradd', 'admin/banner/banneradd');
//上传缩略图
Route::post('/admin/banner/uploadImg','admin/banner/uploadImg');
// 添加编辑页面
Route::get('admin/banner/banneredit/id/:id', 'admin/banner/banneredit', ['ext' => 'html']);
//执行编辑
Route::post('/admin/banner/bannerEdit', 'admin/banner/bannerEdit');
//删除
Route::get('/admin/banner/bannerDel', 'admin/banner/bannerDel');

// 关注/粉丝连接
Route::get('/business/attentId/:attent_id', 'index/business/index');
Route::get('/other/attent_id/:attent_id', 'index/business/other');

Route::get('/business/attentId/:fans_id', 'index/business/index');
Route::get('/business/attent_id/:fans_id', 'index/business/other');



return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]' => [
        ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
